package com.ruicar.afs.cloud.account.vo;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.ruicar.afs.cloud.common.modules.contract.enums.LendingDirection;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;

@Data
public class VoucherEntryVo {
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id ;
    @ApiModelProperty("借贷方向")
    @NotNull(message = "借贷方向不能为空")
    private LendingDirection lendingDirection ;

    @ApiModelProperty("科目代码")
    @NotBlank(message = "科目代码不能为空")
    private String subjectCode ;

    @ApiModelProperty("科目名称")
    @NotBlank(message = "科目名称不能为空")
    private String subjectName ;

    @ApiModelProperty("金额表达式")
    private String amountExpression ;

    @ApiModelProperty("排序号")
    @NotNull(message = "排序号不能为空")
    private Integer orderNum ;

    @ApiModelProperty("摘要")
    @NotBlank(message = "摘要不能为空")
    private String explanation;

    @ApiModelProperty("凭证主表id")
    @NotNull(message = "凭证主表id不能为空")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long correlationId ;

    @ApiModelProperty("辅助核算项目")
    private String auxiliaryAccountingItems;

    @ApiModelProperty("规则编号")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long ruleNo ;

    @ApiModelProperty("中文语言")
    private String chineseLang ;

    @ApiModelProperty("程序语言")
    private String programLang ;

    @ApiModelProperty("核算项目")
    List<String> itemsList;

}
